﻿using System;
using System.Web.Mvc;

namespace Facebook.Web.Mvc
{
    public class FacebookMvcController : Controller
    {
        public FacebookHttpContext FbContext { get { return FacebookHttpContext.Current; } }
        public FacebookHttpRequest FbRequest { get { return FacebookHttpRequest.Current; } }
        public FacebookHttpSession FbSession { get { return FacebookHttpSession.Current; } }

        protected void AppendFbDomResourceId()
        {
            this.ViewData["FbDomResourceId"] = String.Format("{0}_result_{1}", this.ControllerContext.RouteData.Values["action"], DateTime.UtcNow.Ticks);
        }
    }
}